home *** CD-ROM | disk | FTP | other *** search
- Path: inforamp.net!usenet
- From: pcurran@inforamp.net (Peter Curran)
- Newsgroups: comp.std.c
- Subject: Re: Close all opened files in C ?
- Date: Mon, 01 Apr 1996 15:41:11 GMT
- Organization: PSC Enterprises
- Message-ID: <4josua$8gp@sam.inforamp.net>
- References: <4jgifa$fjd@chaos.kulnet.kuleuven.ac.be> <828105458snz@wbriscoe.demon.co.uk> <4jhmg0$50n@solutions.solon.com> <ERIC.96Apr1011638@cse.unl.edu>
- Reply-To: pcurran@inforamp.net
- NNTP-Posting-Host: ts14-10.tor.istar.ca
- X-Newsreader: Forte Free Agent 1.0.82
-
- On 01 Apr 1996 07:16:38 GMT in article <ERIC.96Apr1011638@cse.unl.edu>
- Eric W. Biederman <ebiederm@cse.unl.edu> (Eric W. Biederman) wrote:
-
- >In article <4jhmg0$50n@solutions.solon.com> seebs@solutions.solon.com (Peter Seebach) writes:
-
- > In article <828105458snz@wbriscoe.demon.co.uk>,
- > walter briscoe <walter@wbriscoe.demon.co.uk> wrote:
-
- > >> How can I close all files that are opened ?
-
- >I'm not absolutely positive it's in the standard, but I do believe
- >either you find each on and close it. OR call exit. OR return from
- >main.
-
- >can someone confirm the second two?
-
- The original poster's question did not indicate that the code that opened the
- files was written in C. Since it is concerned with operating a machine-specific
- hardware device, it could well be written in assembly language, or some other
- language, with a C-usable API. If that is the case, the C run-time system would
- know nothing about the files, so none of the mechanisms would be guaranteed to
- work. In most environments terminating the program (i.e. calling exit() or
- returning from main()) will work because the OS takes care of it, but the C
- standard guarantees nothing in such a situation.
-
- --
- Peter Curran pcurran@inforamp.net
-
-